package com.foling.system.entity;

import lombok.Data;

@Data
public class CartItem {
    private Integer productId;
    private String productName;
    private Integer count;
    private int price;
    private int totalPrice;

    public CartItem() {
    }

    public CartItem(int productId, String productName, int count, int price, int totalPrice) {
        this.productId = productId;
        this.productName = productName;
        this.count = count;
        this.price = price;
        this.totalPrice = totalPrice;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getName() {
        return productName;
    }

    public void setName(String name) {
        this.productName = name;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(int totalPrice) {
        this.totalPrice = totalPrice;
    }

    @Override
    public String toString() {
        return "CartItem{" +
                "id=" + productId +
                ", name='" + productName + '\'' +
                ", count=" + count +
                ", price=" + price +
                ", totalPrice=" + totalPrice +
                '}';
    }
}
